<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <template v-for="value in nums">
          <li v-for="v in odd(value)" :key="v+'b'">{{v}}</li>
        </template>
      </ul>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          nums: [
            [1, 2, 3, 4, 5],
            [6, 7, 8, 9, 0],
          ],
        },
        methods: {
          even(arr = [1, 2, 3, 4]) {
            return arr.filter((el) => el % 2 === 0);
          },
          odd(arr = [1, 2, 3, 4]) {
            return arr.filter((el) => el % 2 === 1);
          },
        },
      });
    </script>
  </body>
</html>
